﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace JGSY.CMS.LowCode.Platform.Migrations
{
    /// <inheritdoc />
    public partial class ExtendedLoggingEntities : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "AdditionalData",
                table: "SecurityLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "AttackType",
                table: "SecurityLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "BlockReason",
                table: "SecurityLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CorrelationId",
                table: "SecurityLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "CreatedAt",
                table: "SecurityLogs",
                type: "timestamp with time zone",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "DeviceInfo",
                table: "SecurityLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "GeolocationInfo",
                table: "SecurityLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "HttpMethod",
                table: "SecurityLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "IpAddress",
                table: "SecurityLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "IsBlocked",
                table: "SecurityLogs",
                type: "boolean",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "RiskScore",
                table: "SecurityLogs",
                type: "integer",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "SecurityEventType",
                table: "SecurityLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "StatusCode",
                table: "SecurityLogs",
                type: "integer",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "TenantId",
                table: "SecurityLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ThreatLevel",
                table: "SecurityLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UserAgent",
                table: "SecurityLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "AdditionalData",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CorrelationId",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Description",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<long>(
                name: "Duration",
                table: "OperationLogs",
                type: "bigint",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ErrorMessage",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "HttpMethod",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "IpAddress",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "OperationName",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "OperationType",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "RequestData",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ResponseData",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "Success",
                table: "OperationLogs",
                type: "boolean",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "TenantId",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UserAgent",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UserName",
                table: "OperationLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Data",
                table: "ExceptionLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "FixNotes",
                table: "ExceptionLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "FixedBy",
                table: "ExceptionLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "HelpLink",
                table: "ExceptionLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "RequestData",
                table: "ExceptionLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Source",
                table: "ExceptionLogs",
                type: "text",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "TargetSite",
                table: "ExceptionLogs",
                type: "text",
                nullable: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "AdditionalData",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "AttackType",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "BlockReason",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "CorrelationId",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "CreatedAt",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "DeviceInfo",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "GeolocationInfo",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "HttpMethod",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "IpAddress",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "IsBlocked",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "RiskScore",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "SecurityEventType",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "StatusCode",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "ThreatLevel",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "UserAgent",
                table: "SecurityLogs");

            migrationBuilder.DropColumn(
                name: "AdditionalData",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "CorrelationId",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "Description",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "Duration",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "ErrorMessage",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "HttpMethod",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "IpAddress",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "OperationName",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "OperationType",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "RequestData",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "ResponseData",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "Success",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "TenantId",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "UserAgent",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "UserName",
                table: "OperationLogs");

            migrationBuilder.DropColumn(
                name: "Data",
                table: "ExceptionLogs");

            migrationBuilder.DropColumn(
                name: "FixNotes",
                table: "ExceptionLogs");

            migrationBuilder.DropColumn(
                name: "FixedBy",
                table: "ExceptionLogs");

            migrationBuilder.DropColumn(
                name: "HelpLink",
                table: "ExceptionLogs");

            migrationBuilder.DropColumn(
                name: "RequestData",
                table: "ExceptionLogs");

            migrationBuilder.DropColumn(
                name: "Source",
                table: "ExceptionLogs");

            migrationBuilder.DropColumn(
                name: "TargetSite",
                table: "ExceptionLogs");
        }
    }
}
